<template>
  <!-- 支付宝登录按钮 -->
  <el-button @click="toAlipayLogin">
    <img src="https://t.alipayobjects.com/images/T1HHFgXXVeXXXXXXXX.png"
         alt="支付宝登录" style="width: 180px; height: 40px;">
  </el-button>
</template>


<script setup>
// 跳转至后端接口，由后端重定向到支付宝授权页
import {alipayLogin} from "@/apis/loginApi.js";

const toAlipayLogin=async()=>{
  const res = await alipayLogin()
  console.log(res)
  //window.location.href = "https://dongdong.cloud/alipay/login";
  //window.location.href = "http://localhost:8083/alipay/login";
}
</script>